//
//  StringExt.swift
//  字符串扩展
//
//  Created by jin on 2024/8/1.
//

import Foundation

extension String{
    func isPhone()->Bool{
        return NSPredicate(format: "SELF MATCHES %@", REG_PHONE).evaluate(with: self)
    }
}

let REG_PHONE = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$"
